package com.credithc.signature.manager.client;

import com.credithc.baseserv.core.message.Message;
import com.credithc.signature.manager.ro.TokenRo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 描述：<br/>
 * 作者：sunyang
 * 创建：2019/7/9 17:15
 * 版本：v1.0.0<br/>
 */
@FeignClient(name = "auth", serviceId = "auth")
//FeignClient(name = "auth", serviceId = "auth",url = "10.150.26.183")
//@FeignClient(name = "auth", serviceId = "auth" ,url = "10.150.30.54")
public interface AuthClient {

    @GetMapping("/api/auth/v1/getUserByToken")
    Message getUserByToken(@RequestHeader(name = "token",required = true) String token);

    /**
     * 根据Token获取用户信息
     *
     * @param token
     * @return
     */
    @GetMapping("/api/auth/v1/getUserByToken")
    Message<TokenRo> getUserInfoByToken(@RequestHeader(name = "token", required = true) String token);
}
